<!doctype html>
<html>
    <head>
        <script type="module" src="/node_modules/@perspective-dev/viewer/dist/cdn/perspective-viewer.js"></script>
        <script type="module">
            await customElements.whenDefined("perspective-viewer-plugin");
            const BASE = customElements.get("perspective-viewer-plugin");
            class TestChartPluginHighPriority extends BASE {
                get name() {
                    return "HighPriority";
                }

                get priority() {
                    return 10;
                }
            }

            class TestChartPluginLowPriority extends BASE {
                get name() {
                    return "LowPriority";
                }

                get priority() {
                    return -10;
                }
            }

            customElements.define("low-priority", TestChartPluginLowPriority);
            customElements.define("high-priority", TestChartPluginHighPriority);
            await customElements.whenDefined("perspective-viewer").then((viewer) => {
                viewer.registerPlugin("low-priority");
                viewer.registerPlugin("high-priority");
            });
        </script>

        <script type="module" src="/node_modules/@perspective-dev/test/load-viewer-csv.js"></script>
        <link rel="stylesheet" href="../css/demo.css" />
        <link rel="stylesheet" href="/node_modules/@perspective-dev/viewer/dist/css/pro.css" />
    </head>
    <body>
        <perspective-viewer></perspective-viewer>
    </body>
</html>
